/**
 * Copyright (c) 2015-2017, Henry Yang 杨勇 (gismail@foxmail.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.lambkit.module.upms.sql;

import com.lambkit.db.sql.ConditionMode;
import com.lambkit.db.sql.column.Column;
import com.lambkit.db.sql.column.Columns;
import com.lambkit.db.sql.column.Example;

import java.io.Serializable;
import java.util.List;

/**
 * @author yangyong 
 * @website: www.lambkit.com
 * @email: gismail@foxmail.com
 * @date 2024-05-07
 * @version 1.0
 * @since 1.0
 */
public class UpmsRoleRuleSqlBuilder extends Columns implements Serializable {
	private static final long serialVersionUID = 1L;
	
	public static UpmsRoleRuleSqlBuilder create() {
		return new UpmsRoleRuleSqlBuilder();
	}
	
	public static UpmsRoleRuleSqlBuilder create(Column column) {
		UpmsRoleRuleSqlBuilder that = new UpmsRoleRuleSqlBuilder();
		that.add(column);
        return that;
    }

    public static UpmsRoleRuleSqlBuilder create(String name, Object value) {
        return (UpmsRoleRuleSqlBuilder) create().eq(name, value);
    }
    
    public Example example() {
    	return Example.create("upms_role_rule", this);
    }
    
    /**
     * equals
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsRoleRuleSqlBuilder eq(String name, Object value) {
    	super.eq(name, value);
        return this;
    }

    /**
     * not equals !=
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsRoleRuleSqlBuilder ne(String name, Object value) {
    	super.ne(name, value);
        return this;
    }


    /**
     * like
     *
     * @param name
     * @param value
     * @return
     */

    public UpmsRoleRuleSqlBuilder like(String name, Object value) {
    	super.like(name, value);
        return this;
    }
    
    public UpmsRoleRuleSqlBuilder notLike(String name, Object value) {
    	super.notLike(name, value);
        return this;
    }

    /**
     * 大于 great than
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsRoleRuleSqlBuilder gt(String name, Object value) {
    	super.gt(name, value);
        return this;
    }

    /**
     * 大于等于 great or equal
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsRoleRuleSqlBuilder ge(String name, Object value) {
    	super.ge(name, value);
        return this;
    }

    /**
     * 小于 less than
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsRoleRuleSqlBuilder lt(String name, Object value) {
    	super.lt(name, value);
        return this;
    }

    /**
     * 小于等于 less or equal
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsRoleRuleSqlBuilder le(String name, Object value) {
    	super.le(name, value);
        return this;
    }
    
    public UpmsRoleRuleSqlBuilder isnull(String name) {
    	super.isnull(name);
        return this;
    } 

    public UpmsRoleRuleSqlBuilder notNull(String name) {
    	super.notNull(name);
        return this;
    } 
    
    public UpmsRoleRuleSqlBuilder empty(String name) {
    	super.empty(name);
        return this;
    } 
    
    public UpmsRoleRuleSqlBuilder notEmpty(String name) {
    	super.notEmpty(name);
        return this;
    } 
    
    public UpmsRoleRuleSqlBuilder add(Column column) {
    	super.add(column);
    	return this;
    }
    
    /**************************/
	
	public void addCriterion(String name, Object value, ConditionMode logic, String property, String typeHandler, String valueType) {
		 if (value == null) {
			 throw new RuntimeException("Value for " + property + " cannot be null");
		 }
		 add(Column.create(name, value, logic, typeHandler, valueType));
	}
   
	public void addCriterion(String name, Object value1, Object value2, ConditionMode logic, String property, String typeHandler, String valueType) {
		 if (value1 == null || value2 == null) {
			 throw new RuntimeException("Between values for " + property + " cannot be null");
		 }
		 add(Column.create(name, value1, value2, logic, typeHandler, valueType));
	}
		 
	public UpmsRoleRuleSqlBuilder andRuleRoleIdIsNull() {
		isnull("rule_role_id");
		return this;
	}
	
	public UpmsRoleRuleSqlBuilder andRuleRoleIdIsNotNull() {
		notNull("rule_role_id");
		return this;
	}
	
	public UpmsRoleRuleSqlBuilder andRuleRoleIdIsEmpty() {
		empty("rule_role_id");
		return this;
	}

	public UpmsRoleRuleSqlBuilder andRuleRoleIdIsNotEmpty() {
		notEmpty("rule_role_id");
		return this;
	}
       public UpmsRoleRuleSqlBuilder andRuleRoleIdEqualTo(java.lang.Long value) {
          addCriterion("rule_role_id", value, ConditionMode.EQUAL, "ruleRoleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleRoleIdNotEqualTo(java.lang.Long value) {
          addCriterion("rule_role_id", value, ConditionMode.NOT_EQUAL, "ruleRoleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleRoleIdGreaterThan(java.lang.Long value) {
          addCriterion("rule_role_id", value, ConditionMode.GREATER_THEN, "ruleRoleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleRoleIdGreaterThanOrEqualTo(java.lang.Long value) {
          addCriterion("rule_role_id", value, ConditionMode.GREATER_EQUAL, "ruleRoleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleRoleIdLessThan(java.lang.Long value) {
          addCriterion("rule_role_id", value, ConditionMode.LESS_THEN, "ruleRoleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleRoleIdLessThanOrEqualTo(java.lang.Long value) {
          addCriterion("rule_role_id", value, ConditionMode.LESS_EQUAL, "ruleRoleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleRoleIdBetween(java.lang.Long value1, java.lang.Long value2) {
    	  addCriterion("rule_role_id", value1, value2, ConditionMode.BETWEEN, "ruleRoleId", "java.lang.Long", "Float");
    	  return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleRoleIdNotBetween(java.lang.Long value1, java.lang.Long value2) {
          addCriterion("rule_role_id", value1, value2, ConditionMode.NOT_BETWEEN, "ruleRoleId", "java.lang.Long", "Float");
          return this;
      }
        
      public UpmsRoleRuleSqlBuilder andRuleRoleIdIn(List<java.lang.Long> values) {
          addCriterion("rule_role_id", values, ConditionMode.IN, "ruleRoleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleRoleIdNotIn(List<java.lang.Long> values) {
          addCriterion("rule_role_id", values, ConditionMode.NOT_IN, "ruleRoleId", "java.lang.Long", "Float");
          return this;
      }
	public UpmsRoleRuleSqlBuilder andRoleIdIsNull() {
		isnull("role_id");
		return this;
	}
	
	public UpmsRoleRuleSqlBuilder andRoleIdIsNotNull() {
		notNull("role_id");
		return this;
	}
	
	public UpmsRoleRuleSqlBuilder andRoleIdIsEmpty() {
		empty("role_id");
		return this;
	}

	public UpmsRoleRuleSqlBuilder andRoleIdIsNotEmpty() {
		notEmpty("role_id");
		return this;
	}
       public UpmsRoleRuleSqlBuilder andRoleIdEqualTo(java.lang.Long value) {
          addCriterion("role_id", value, ConditionMode.EQUAL, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRoleIdNotEqualTo(java.lang.Long value) {
          addCriterion("role_id", value, ConditionMode.NOT_EQUAL, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRoleIdGreaterThan(java.lang.Long value) {
          addCriterion("role_id", value, ConditionMode.GREATER_THEN, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRoleIdGreaterThanOrEqualTo(java.lang.Long value) {
          addCriterion("role_id", value, ConditionMode.GREATER_EQUAL, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRoleIdLessThan(java.lang.Long value) {
          addCriterion("role_id", value, ConditionMode.LESS_THEN, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRoleIdLessThanOrEqualTo(java.lang.Long value) {
          addCriterion("role_id", value, ConditionMode.LESS_EQUAL, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRoleIdBetween(java.lang.Long value1, java.lang.Long value2) {
    	  addCriterion("role_id", value1, value2, ConditionMode.BETWEEN, "roleId", "java.lang.Long", "Float");
    	  return this;
      }

      public UpmsRoleRuleSqlBuilder andRoleIdNotBetween(java.lang.Long value1, java.lang.Long value2) {
          addCriterion("role_id", value1, value2, ConditionMode.NOT_BETWEEN, "roleId", "java.lang.Long", "Float");
          return this;
      }
        
      public UpmsRoleRuleSqlBuilder andRoleIdIn(List<java.lang.Long> values) {
          addCriterion("role_id", values, ConditionMode.IN, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRoleIdNotIn(List<java.lang.Long> values) {
          addCriterion("role_id", values, ConditionMode.NOT_IN, "roleId", "java.lang.Long", "Float");
          return this;
      }
	public UpmsRoleRuleSqlBuilder andRuleIdIsNull() {
		isnull("rule_id");
		return this;
	}
	
	public UpmsRoleRuleSqlBuilder andRuleIdIsNotNull() {
		notNull("rule_id");
		return this;
	}
	
	public UpmsRoleRuleSqlBuilder andRuleIdIsEmpty() {
		empty("rule_id");
		return this;
	}

	public UpmsRoleRuleSqlBuilder andRuleIdIsNotEmpty() {
		notEmpty("rule_id");
		return this;
	}
       public UpmsRoleRuleSqlBuilder andRuleIdEqualTo(java.lang.Long value) {
          addCriterion("rule_id", value, ConditionMode.EQUAL, "ruleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleIdNotEqualTo(java.lang.Long value) {
          addCriterion("rule_id", value, ConditionMode.NOT_EQUAL, "ruleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleIdGreaterThan(java.lang.Long value) {
          addCriterion("rule_id", value, ConditionMode.GREATER_THEN, "ruleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleIdGreaterThanOrEqualTo(java.lang.Long value) {
          addCriterion("rule_id", value, ConditionMode.GREATER_EQUAL, "ruleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleIdLessThan(java.lang.Long value) {
          addCriterion("rule_id", value, ConditionMode.LESS_THEN, "ruleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleIdLessThanOrEqualTo(java.lang.Long value) {
          addCriterion("rule_id", value, ConditionMode.LESS_EQUAL, "ruleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleIdBetween(java.lang.Long value1, java.lang.Long value2) {
    	  addCriterion("rule_id", value1, value2, ConditionMode.BETWEEN, "ruleId", "java.lang.Long", "Float");
    	  return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleIdNotBetween(java.lang.Long value1, java.lang.Long value2) {
          addCriterion("rule_id", value1, value2, ConditionMode.NOT_BETWEEN, "ruleId", "java.lang.Long", "Float");
          return this;
      }
        
      public UpmsRoleRuleSqlBuilder andRuleIdIn(List<java.lang.Long> values) {
          addCriterion("rule_id", values, ConditionMode.IN, "ruleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andRuleIdNotIn(List<java.lang.Long> values) {
          addCriterion("rule_id", values, ConditionMode.NOT_IN, "ruleId", "java.lang.Long", "Float");
          return this;
      }
	public UpmsRoleRuleSqlBuilder andCreateTimeIsNull() {
		isnull("create_time");
		return this;
	}
	
	public UpmsRoleRuleSqlBuilder andCreateTimeIsNotNull() {
		notNull("create_time");
		return this;
	}
	
	public UpmsRoleRuleSqlBuilder andCreateTimeIsEmpty() {
		empty("create_time");
		return this;
	}

	public UpmsRoleRuleSqlBuilder andCreateTimeIsNotEmpty() {
		notEmpty("create_time");
		return this;
	}
       public UpmsRoleRuleSqlBuilder andCreateTimeEqualTo(java.util.Date value) {
          addCriterion("create_time", value, ConditionMode.EQUAL, "createTime", "java.util.Date", "String");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andCreateTimeNotEqualTo(java.util.Date value) {
          addCriterion("create_time", value, ConditionMode.NOT_EQUAL, "createTime", "java.util.Date", "String");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andCreateTimeGreaterThan(java.util.Date value) {
          addCriterion("create_time", value, ConditionMode.GREATER_THEN, "createTime", "java.util.Date", "String");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andCreateTimeGreaterThanOrEqualTo(java.util.Date value) {
          addCriterion("create_time", value, ConditionMode.GREATER_EQUAL, "createTime", "java.util.Date", "String");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andCreateTimeLessThan(java.util.Date value) {
          addCriterion("create_time", value, ConditionMode.LESS_THEN, "createTime", "java.util.Date", "String");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andCreateTimeLessThanOrEqualTo(java.util.Date value) {
          addCriterion("create_time", value, ConditionMode.LESS_EQUAL, "createTime", "java.util.Date", "String");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andCreateTimeBetween(java.util.Date value1, java.util.Date value2) {
    	  addCriterion("create_time", value1, value2, ConditionMode.BETWEEN, "createTime", "java.util.Date", "String");
    	  return this;
      }

      public UpmsRoleRuleSqlBuilder andCreateTimeNotBetween(java.util.Date value1, java.util.Date value2) {
          addCriterion("create_time", value1, value2, ConditionMode.NOT_BETWEEN, "createTime", "java.util.Date", "String");
          return this;
      }
        
      public UpmsRoleRuleSqlBuilder andCreateTimeIn(List<java.util.Date> values) {
          addCriterion("create_time", values, ConditionMode.IN, "createTime", "java.util.Date", "String");
          return this;
      }

      public UpmsRoleRuleSqlBuilder andCreateTimeNotIn(List<java.util.Date> values) {
          addCriterion("create_time", values, ConditionMode.NOT_IN, "createTime", "java.util.Date", "String");
          return this;
      }
}